ifeq ($(CONFIG_SOC_SERIES_STM32H7), y)

src-y += soc/src/system_stm32h7xx.c
src-y += drivers/src/stm32h7xx_hal.c
src-y += drivers/src/stm32h7xx_hal_rcc.c
src-y += drivers/src/stm32h7xx_hal_rcc_ex.c
src-$(CONFIG_USE_STM32_HAL_ADC) += drivers/src/stm32h7xx_hal_adc.c
src-$(CONFIG_USE_STM32_HAL_ADC_EX) += drivers/src/stm32h7xx_hal_adc_ex.c
src-$(CONFIG_USE_STM32_HAL_CEC) += drivers/src/stm32h7xx_hal_cec.c
src-$(CONFIG_USE_STM32_HAL_COMP) += drivers/src/stm32h7xx_hal_comp.c
src-$(CONFIG_USE_STM32_HAL_CORDIC) += drivers/src/stm32h7xx_hal_cordic.c
src-$(CONFIG_USE_STM32_HAL_CORTEX) += drivers/src/stm32h7xx_hal_cortex.c
src-$(CONFIG_USE_STM32_HAL_CRC) += drivers/src/stm32h7xx_hal_crc.c
src-$(CONFIG_USE_STM32_HAL_CRC_EX) += drivers/src/stm32h7xx_hal_crc_ex.c
src-$(CONFIG_USE_STM32_HAL_CRYP) += drivers/src/stm32h7xx_hal_cryp.c
src-$(CONFIG_USE_STM32_HAL_CRYP_EX) += drivers/src/stm32h7xx_hal_cryp_ex.c
src-$(CONFIG_USE_STM32_HAL_DAC) += drivers/src/stm32h7xx_hal_dac.c
src-$(CONFIG_USE_STM32_HAL_DAC_EX) += drivers/src/stm32h7xx_hal_dac_ex.c
src-$(CONFIG_USE_STM32_HAL_DCMI) += drivers/src/stm32h7xx_hal_dcmi.c
src-$(CONFIG_USE_STM32_HAL_DFSDM) += drivers/src/stm32h7xx_hal_dfsdm.c
src-$(CONFIG_USE_STM32_HAL_DFSDM_EX) += drivers/src/stm32h7xx_hal_dfsdm_ex.c
src-$(CONFIG_USE_STM32_HAL_DMA) += drivers/src/stm32h7xx_hal_dma.c
src-$(CONFIG_USE_STM32_HAL_DMA2D) += drivers/src/stm32h7xx_hal_dma2d.c
src-$(CONFIG_USE_STM32_HAL_DMA_EX) += drivers/src/stm32h7xx_hal_dma_ex.c
src-$(CONFIG_USE_STM32_HAL_DSI) += drivers/src/stm32h7xx_hal_dsi.c
src-$(CONFIG_USE_STM32_HAL_DTS) += drivers/src/stm32h7xx_hal_dts.c

ifeq ($(CONFIG_ETH_STM32_HAL_API_V1), y)
src-$(CONFIG_USE_STM32_HAL_ETH) += drivers/src/Legacy/stm32h7xx_hal_eth.c
src-$(CONFIG_USE_STM32_HAL_ETH_EX) += drivers/src/Legacy/stm32h7xx_hal_eth_ex.c
else
src-$(CONFIG_USE_STM32_HAL_ETH) += drivers/src/stm32h7xx_hal_eth.c
src-$(CONFIG_USE_STM32_HAL_ETH_EX) += drivers/src/stm32h7xx_hal_eth_ex.c
endif

src-$(CONFIG_USE_STM32_HAL_EXTI) += drivers/src/stm32h7xx_hal_exti.c
src-$(CONFIG_USE_STM32_HAL_FDCAN) += drivers/src/stm32h7xx_hal_fdcan.c
src-$(CONFIG_USE_STM32_HAL_FLASH) += drivers/src/stm32h7xx_hal_flash.c
src-$(CONFIG_USE_STM32_HAL_FLASH_EX) += drivers/src/stm32h7xx_hal_flash_ex.c
src-$(CONFIG_USE_STM32_HAL_FMAC) += drivers/src/stm32h7xx_hal_fmac.c
src-$(CONFIG_USE_STM32_HAL_GFXMMU) += drivers/src/stm32h7xx_hal_gfxmmu.c
src-$(CONFIG_USE_STM32_HAL_GPIO) += drivers/src/stm32h7xx_hal_gpio.c
src-$(CONFIG_USE_STM32_HAL_HASH) += drivers/src/stm32h7xx_hal_hash.c
src-$(CONFIG_USE_STM32_HAL_HASH_EX) += drivers/src/stm32h7xx_hal_hash_ex.c
src-$(CONFIG_USE_STM32_HAL_HCD) += drivers/src/stm32h7xx_hal_hcd.c
src-$(CONFIG_USE_STM32_HAL_HRTIM) += drivers/src/stm32h7xx_hal_hrtim.c
src-$(CONFIG_USE_STM32_HAL_HSEM) += drivers/src/stm32h7xx_hal_hsem.c
src-$(CONFIG_USE_STM32_HAL_I2C) += drivers/src/stm32h7xx_hal_i2c.c
src-$(CONFIG_USE_STM32_HAL_I2C_EX) += drivers/src/stm32h7xx_hal_i2c_ex.c
src-$(CONFIG_USE_STM32_HAL_I2S) += drivers/src/stm32h7xx_hal_i2s.c
src-$(CONFIG_USE_STM32_HAL_I2S_EX) += drivers/src/stm32h7xx_hal_i2s_ex.c
src-$(CONFIG_USE_STM32_HAL_IRDA) += drivers/src/stm32h7xx_hal_irda.c
src-$(CONFIG_USE_STM32_HAL_IWDG) += drivers/src/stm32h7xx_hal_iwdg.c
src-$(CONFIG_USE_STM32_HAL_JPEG) += drivers/src/stm32h7xx_hal_jpeg.c
src-$(CONFIG_USE_STM32_HAL_LPTIM) += drivers/src/stm32h7xx_hal_lptim.c
src-$(CONFIG_USE_STM32_HAL_LTDC) += drivers/src/stm32h7xx_hal_ltdc.c
src-$(CONFIG_USE_STM32_HAL_LTDC_EX) += drivers/src/stm32h7xx_hal_ltdc_ex.c
src-$(CONFIG_USE_STM32_HAL_MDIOS) += drivers/src/stm32h7xx_hal_mdios.c
src-$(CONFIG_USE_STM32_HAL_MDMA) += drivers/src/stm32h7xx_hal_mdma.c
src-$(CONFIG_USE_STM32_HAL_MMC) += drivers/src/stm32h7xx_hal_mmc.c
src-$(CONFIG_USE_STM32_HAL_MMC_EX) += drivers/src/stm32h7xx_hal_mmc_ex.c
src-$(CONFIG_USE_STM32_HAL_NAND) += drivers/src/stm32h7xx_hal_nand.c
src-$(CONFIG_USE_STM32_HAL_NOR) += drivers/src/stm32h7xx_hal_nor.c
src-$(CONFIG_USE_STM32_HAL_OPAMP) += drivers/src/stm32h7xx_hal_opamp.c
src-$(CONFIG_USE_STM32_HAL_OPAMP_EX) += drivers/src/stm32h7xx_hal_opamp_ex.c
src-$(CONFIG_USE_STM32_HAL_OSPI) += drivers/src/stm32h7xx_hal_ospi.c
src-$(CONFIG_USE_STM32_HAL_OTFDEC) += drivers/src/stm32h7xx_hal_otfdec.c
src-$(CONFIG_USE_STM32_HAL_PCD) += drivers/src/stm32h7xx_hal_pcd.c
src-$(CONFIG_USE_STM32_HAL_PCD_EX) += drivers/src/stm32h7xx_hal_pcd_ex.c
src-$(CONFIG_USE_STM32_HAL_PSSI) += drivers/src/stm32h7xx_hal_pssi.c
src-$(CONFIG_USE_STM32_HAL_PWR) += drivers/src/stm32h7xx_hal_pwr.c
src-$(CONFIG_USE_STM32_HAL_PWR_EX) += drivers/src/stm32h7xx_hal_pwr_ex.c
src-$(CONFIG_USE_STM32_HAL_QSPI) += drivers/src/stm32h7xx_hal_qspi.c
src-$(CONFIG_USE_STM32_HAL_RAMECC) += drivers/src/stm32h7xx_hal_ramecc.c
src-$(CONFIG_USE_STM32_HAL_RNG) += drivers/src/stm32h7xx_hal_rng.c
src-$(CONFIG_USE_STM32_HAL_RNG_EX) += drivers/src/stm32h7xx_hal_rng_ex.c
src-$(CONFIG_USE_STM32_HAL_RTC) += drivers/src/stm32h7xx_hal_rtc.c
src-$(CONFIG_USE_STM32_HAL_RTC_EX) += drivers/src/stm32h7xx_hal_rtc_ex.c
src-$(CONFIG_USE_STM32_HAL_SAI) += drivers/src/stm32h7xx_hal_sai.c
src-$(CONFIG_USE_STM32_HAL_SAI_EX) += drivers/src/stm32h7xx_hal_sai_ex.c
src-$(CONFIG_USE_STM32_HAL_SD) += drivers/src/stm32h7xx_hal_sd.c
src-$(CONFIG_USE_STM32_HAL_SD_EX) += drivers/src/stm32h7xx_hal_sd_ex.c
src-$(CONFIG_USE_STM32_HAL_SDRAM) += drivers/src/stm32h7xx_hal_sdram.c
src-$(CONFIG_USE_STM32_HAL_SMARTCARD) += drivers/src/stm32h7xx_hal_smartcard.c
src-$(CONFIG_USE_STM32_HAL_SMARTCARD_EX) += drivers/src/stm32h7xx_hal_smartcard_ex.c
src-$(CONFIG_USE_STM32_HAL_SMBUS) += drivers/src/stm32h7xx_hal_smbus.c
src-$(CONFIG_USE_STM32_HAL_SMBUS_EX) += drivers/src/stm32h7xx_hal_smbus_ex.c
src-$(CONFIG_USE_STM32_HAL_SPDIFRX) += drivers/src/stm32h7xx_hal_spdifrx.c
src-$(CONFIG_USE_STM32_HAL_SPI) += drivers/src/stm32h7xx_hal_spi.c
src-$(CONFIG_USE_STM32_HAL_SPI_EX) += drivers/src/stm32h7xx_hal_spi_ex.c
src-$(CONFIG_USE_STM32_HAL_SRAM) += drivers/src/stm32h7xx_hal_sram.c
src-$(CONFIG_USE_STM32_HAL_SWPMI) += drivers/src/stm32h7xx_hal_swpmi.c
src-$(CONFIG_USE_STM32_HAL_TIM) += drivers/src/stm32h7xx_hal_tim.c
src-$(CONFIG_USE_STM32_HAL_TIM_EX) += drivers/src/stm32h7xx_hal_tim_ex.c
src-$(CONFIG_USE_STM32_HAL_UART) += drivers/src/stm32h7xx_hal_uart.c
src-$(CONFIG_USE_STM32_HAL_UART_EX) += drivers/src/stm32h7xx_hal_uart_ex.c
src-$(CONFIG_USE_STM32_HAL_USART) += drivers/src/stm32h7xx_hal_usart.c
src-$(CONFIG_USE_STM32_HAL_USART_EX) += drivers/src/stm32h7xx_hal_usart_ex.c
src-$(CONFIG_USE_STM32_HAL_WWDG) += drivers/src/stm32h7xx_hal_wwdg.c
src-$(CONFIG_USE_STM32_LL_ADC) += drivers/src/stm32h7xx_ll_adc.c
src-$(CONFIG_USE_STM32_LL_BDMA) += drivers/src/stm32h7xx_ll_bdma.c
src-$(CONFIG_USE_STM32_LL_COMP) += drivers/src/stm32h7xx_ll_comp.c
src-$(CONFIG_USE_STM32_LL_CORDIC) += drivers/src/stm32h7xx_ll_cordic.c
src-$(CONFIG_USE_STM32_LL_CRC) += drivers/src/stm32h7xx_ll_crc.c
src-$(CONFIG_USE_STM32_LL_CRS) += drivers/src/stm32h7xx_ll_crs.c
src-$(CONFIG_USE_STM32_LL_DAC) += drivers/src/stm32h7xx_ll_dac.c
src-$(CONFIG_USE_STM32_LL_DELAYBLOCK) += drivers/src/stm32h7xx_ll_delayblock.c
src-$(CONFIG_USE_STM32_LL_DMA) += drivers/src/stm32h7xx_ll_dma.c
src-$(CONFIG_USE_STM32_LL_DMA2D) += drivers/src/stm32h7xx_ll_dma2d.c
src-$(CONFIG_USE_STM32_LL_EXTI) += drivers/src/stm32h7xx_ll_exti.c
src-$(CONFIG_USE_STM32_LL_FMAC) += drivers/src/stm32h7xx_ll_fmac.c
src-$(CONFIG_USE_STM32_LL_FMC) += drivers/src/stm32h7xx_ll_fmc.c
src-$(CONFIG_USE_STM32_LL_GPIO) += drivers/src/stm32h7xx_ll_gpio.c
src-$(CONFIG_USE_STM32_LL_HRTIM) += drivers/src/stm32h7xx_ll_hrtim.c
src-$(CONFIG_USE_STM32_LL_I2C) += drivers/src/stm32h7xx_ll_i2c.c
src-$(CONFIG_USE_STM32_LL_LPTIM) += drivers/src/stm32h7xx_ll_lptim.c
src-$(CONFIG_USE_STM32_LL_LPUART) += drivers/src/stm32h7xx_ll_lpuart.c
src-$(CONFIG_USE_STM32_LL_MDMA) += drivers/src/stm32h7xx_ll_mdma.c
src-$(CONFIG_USE_STM32_LL_OPAMP) += drivers/src/stm32h7xx_ll_opamp.c
src-$(CONFIG_USE_STM32_LL_PWR) += drivers/src/stm32h7xx_ll_pwr.c
src-$(CONFIG_USE_STM32_LL_RCC) += drivers/src/stm32h7xx_ll_rcc.c
src-$(CONFIG_USE_STM32_LL_RNG) += drivers/src/stm32h7xx_ll_rng.c
src-$(CONFIG_USE_STM32_LL_RTC) += drivers/src/stm32h7xx_ll_rtc.c
src-$(CONFIG_USE_STM32_LL_SDMMC) += drivers/src/stm32h7xx_ll_sdmmc.c
src-$(CONFIG_USE_STM32_LL_SPI) += drivers/src/stm32h7xx_ll_spi.c
src-$(CONFIG_USE_STM32_LL_SWPMI) += drivers/src/stm32h7xx_ll_swpmi.c
src-$(CONFIG_USE_STM32_LL_TIM) += drivers/src/stm32h7xx_ll_tim.c
src-$(CONFIG_USE_STM32_LL_USART) += drivers/src/stm32h7xx_ll_usart.c
src-$(CONFIG_USE_STM32_LL_USB) += drivers/src/stm32h7xx_ll_usb.c
src-$(CONFIG_USE_STM32_LL_UTILS) += drivers/src/stm32h7xx_ll_utils.c

inc-g-y += soc/inc
inc-g-y += drivers/inc
inc-g-y += .

cflags-l-$(CONFIG_KEIL) += -Wno-switch-enum -Wno-covered-switch-default -Wno-missing-noreturn -Wno-conversion
cflags-drivers/src/stm32h7xx_hal_rcc.c += -Wno-embedded-directive

endif
